home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6116 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  33 lines

  1. Path: neurocog.lrdc.pitt.edu!hahn
  2. From: hahn@neurocog.lrdc.pitt.edu (Mark Hahn)
  3. Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.misc,comp.programming,comp.unix.programmer,comp.unix.questions
  4. Subject: Re: help -- link 'getrusage' on HP
  5. Followup-To: comp.sys.hp.hpux
  6. Date: 10 Feb 1996 21:07:29 GMT
  7. Organization: Learning Research and Development Center at U. of Pittsburgh
  8. Message-ID: <4fj1eh$ltk@usenet.srv.cis.pitt.edu>
  9. References: <4finp6$f68@spool.cs.wisc.edu>
  10. NNTP-Posting-Host: neurocog.lrdc.pitt.edu
  11.  
  12.  
  13. fix your damn posting software!
  14.  
  15.  
  16. > I tried to link a program which call the procedure 'getrusage',
  17. > but it failed on HP. I am wondering which libray that I should include.
  18. > ( I didn't find the man page for this routine in my HP machine. maybe
  19. > yours can ).
  20.  
  21. getrusage is an obsolete bsdism; hpux actually includes the syscall,
  22. but doesn't provide a library wrapper for it.  this works:
  23.  
  24. #ifdef __hpux
  25. #include <sys/syscall.h>
  26. #define getrusage(a, b)  syscall(SYS_GETRUSAGE, a, b)
  27. #endif /* hpux */
  28.  
  29. regards, mark hahn.
  30. --
  31. operator may differ from spokesperson.    hahn@neurocog.lrdc.pitt.edu
  32.                     http://neurocog.lrdc.pitt.edu/~hahn/
  33.